<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>在线考试系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
        integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
    <link rel="stylesheet" href="/css/admin/launchExam.css">
</head>

<body>
    <%- include ("../publicEjs/public.ejs")%>

    <div class="container-fluid" style="margin-top: 80px;">
        <div class="row">
            <%- include ("../publicEjs/adminLeft.ejs")%>
            <div class="col-9">
                <form>
                    <div class="form-row">
                        <div class="col-md-4 mb-3">
                            <label for="test_name">试卷名称</label>
                            <input name="test_name" type="text" class="form-control" id="test_name" required>
                        </div>
                        <div class="col-md-4 mb-3">
                            <label for="subject">试卷科目</label>
                            <select name="subject" class="custom-select" id="subject" required>
                                <option selected disabled value="">选择试卷科目</option>
                                <option value="语文">语文</option>
                                <option value="数学">数学</option>
                                <option value="英语">英语</option>
                            </select>
                        </div>
                        <div class="col-md-2 mb-3">
                            <label for="test_amount">题目总数</label>
                            <input name="test_amount" type="number" class="form-control" id="test_amount" disabled
                                required>
                        </div>
                    </div>
                    <div class="form-row">
                        <div class="col-md-3 mb-3">
                            <label for="startTime">出题开始时间</label>
                            <input name="startTime" type="datetime-local" class="form-control" id="startTime" required>
                        </div>
                        <div class="col-md-3 mb-3">
                            <label for="endTime">出题结束时间</label>
                            <input name="endTime" type="datetime-local" class="form-control" id="endTime" required>
                        </div>
                    </div>
                    <div class="teacher" id="teacherCon">
                        <div class="form-row">
                            <div class="col-md-6 mb-3">
                                <label for="validationDefault03">出题教师 1 </label>
                                <select class="custom-select tbExamWorks" id="validationDefault03" required>
                                    <option selected disabled value="">选择出题教师</option>

                                    <%for(var i=0;i<list.length;i++) { %>

                                    <option value="<%=list[i].id%>"><%=list[i].userName%></option>

                                    <% } %>

                                </select>
                            </div>
                            <div class="col-md-3 mb-3">
                                <label for="validationDefault04">分配题目</label>
                                <select class="custom-select chutishuliang" id="validationDefault04" required>
                                    <option selected disabled value="0">选择出题数量</option>
                                    <option value="5">5</option>
                                    <option value="10">10</option>
                                    <option value="20">20</option>
                                    <option value="30">30</option>
                                    <option value="40">40</option>
                                    <option value="50">50</option>
                                </select>
                            </div>
                            <div class="col-md-3 mb-3">
                                <label for="validationDefault05">备注</label>
                                <input name="note" type="text" class="form-control beizhu" id="validationDefault05">
                            </div>
                        </div>
                    </div>
                    <div class="form-group">
                        <button type="button" onclick="addTeacher()" class="btn btn-secondary">+ 新增出题教师</button>
                    </div>

                    <button onclick="launch()" class="btn btn-primary" style="display: block;margin-top: 15px;"
                        type="button">提交</button>
                </form>
            </div>
        </div>
    </div>

    <%- include ("../publicEjs/foot.ejs")%>

    <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.slim.min.js"
        integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
        integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
        integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
        crossorigin="anonymous"></script>
    <script src="/js/jquery.js"></script>
    <script src="/js/admin/createExam.js"></script>
    <script src="/js/admin/publicAdmin.js"></script>
</body>

</html>